Skip to content

London | 26-ITP-January | Karla Grajales | Sprint 1 | coursework/sprint-1#910

Open
Grajales-K wants to merge 23 commits intoCodeYourFuture:mainfrom
Grajales-K:coursework/sprint-1
Open

London | 26-ITP-January | Karla Grajales | Sprint 1 | coursework/sprint-1#910
Grajales-K wants to merge 23 commits intoCodeYourFuture:mainfrom
Grajales-K:coursework/sprint-1

Conversation

@Grajales-K
Copy link

@Grajales-K Grajales-K commented Jan 25, 2026

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

This project is about starting to learn how to use methods in JS, and using the console on the browser, at some point, my branch remotely and locally lost the connection, so I ran from my terminal git branch --unset-upstream and then
git push -u origin coursework/sprint-1 to link the branches.

Questions

Do you have any recommendations for learning how to use Git more deeply, especially when we want to go back in history and keep only a specific part in the head of my branch?

Basically, a surgery choosing a specific part to bring back from historical commits.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@Grajales-K Grajales-K added 🏕 Priority Mandatory This work is expected 📅 Sprint 1 Assigned during Sprint 1 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Submit:PR Module-Structuring-And-Testing-Data The name of the module. labels Jan 25, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jan 26, 2026
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@Grajales-K Grajales-K added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jan 26, 2026
@Grajales-K Grajales-K added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Feb 9, 2026
@Theoreoluwa Theoreoluwa added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Feb 14, 2026
Comment on lines +8 to +11

const initials = firstName.charAt(0) + middleName.charAt(0) + lastName.charAt(0);
console.log( `acronym = ${initials}`);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done. It might be better practice to stick with the variable declaration format already provided.



console.log(`The dir is 👉 ${dir}`);
console.log(`The nameFile is 👉 ${fileName}`);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's good practice to infuse an additional variable into your task. Well done.

Comment on lines +13 to +17
Math.floor() //removes decimal part and returns whole number
Math.random() //needs to values between minimum and maximum to generate a random number

console.log(maximum - minimum + 1 ) + minimum; // this is same as 100 - 1 + 1 = 100
console.log(`The random number is ${num}`); No newline at end of file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to do more in following the given task instruction. Is there a way you could have broken down the flow of the code more? Rather than focusing on just highlighting the math object, why not expatiate on how the equation is solved to arrive at the value in the num variable.

Comment on lines +2 to +6
const numberString = cardNumber.toString();
const last4Digits = numberString.slice(-4);
const num = Number(last4Digits);

console.log(num);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good implementation and variable naming convention.

Comment on lines +16 to +22
// There are 6 function calls in this file:
// Line 5: carPrice.replaceAll(",", "")
// Line 5: Number(carPrice.replaceAll(",", ""))
// Line 6: priceAfterOneYear.replaceAll(",", "")
// Line 6: Number(priceAfterOneYear.replaceAll(",", ""))
// Line 10: console.log(`The percentage change is ${percentageChange}`) this is also
// a function call to log the output as string to the console, then call the var percentageChange

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you have a look at the number of function calls again and if you are sure, provide a little textual explanation for your reasoning.

Comment on lines +42 to +43
//result stores the variables of totalHours, remainingMinutes and remainingSeconds in a string format readable time clock "H:M:S"
//A better name for this variable could be MovieDuration

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great contextual naming convention

Comment on lines +21 to +27
📢 The message you pass to alert() is displayed to the user.

⏸️ JavaScript execution pauses until the user clicks OK.

🚫 The user can’t interact with the page while the alert is open (it blocks the UI).


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great and detailed response

Comment on lines 29 to +50
Now try invoking the function `prompt` with a string input of `"What is your name?"` - store the return value of your call to `prompt` in an variable called `myName`.


let myName = prompt("hello what is your name")
alert("hi " + myName)

The prompt function displays a modal dialog that captures user input. The value entered is stored in myName, and alert then displays a greeting that includes that value.


What effect does calling the `prompt` function have?
What is the return value of `prompt`?

Calling the prompt() function displays a modal pop-up dialog that:

* Shows a message to the user

* Includes a text input field

* Has OK and Cancel buttons

* Blocks interaction with the page until the user responds

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there ways to improve your implementation to follow the acceptance criteria for the tasks? Read through it and practise again. I'm sure you will get new insights

Comment on lines +4 to +21

// Create a variable called wholeNumberPart and assign to it an expression that evaluates to 56 ( the whole number part of num )
// Create a variable called decimalPart and assign to it an expression that evaluates to 0.5678 ( the decimal part of num )
// Create a variable called roundedNum and assign to it an expression that evaluates to 57 ( num rounded to the nearest whole number )

// Log your variables to the console to check your answers


const wholeNumberPart = Math.floor(num);
console.log(` Whole number = ${wholeNumberPart}`);

const decimalPart = num - wholeNumberPart;
console.log(` Decimal part = ${decimalPart.toFixed(4)}`); // toFixed(4) to show 4 decimal places instead of whole number

console.log(`type of parameter = ${typeof(wholeNumberPart)}`); //confirm that decimalPart is a number

const roundedNum = Math.round(num); // rounds to nearest whole number
console.log(` Rounded number = ${roundedNum}`); No newline at end of file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's good practice to involve some new tasks for yourself to improve your skills.

Copy link

@Theoreoluwa Theoreoluwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very well done so far. Kindly see to the comments made and how to make it better.

@Theoreoluwa Theoreoluwa added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Structuring-And-Testing-Data The name of the module. 🏕 Priority Mandatory This work is expected Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 1 Assigned during Sprint 1 of this module Submit:PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants